#import "JoyfulKingdomView.h"


@implementation JoyfulKingdomView



- (void)setWhisperGritFlow:(JoyfulKingdomModel *)whisperGritFlow {
	_whisperGritFlow = whisperGritFlow;

	//: 配置cell的UI

[self.dreamMarbleImageView sd_setImageWithURL:[NSURL URLWithString:whisperGritFlow.knot.stringValue] placeholderImage:nil];

}
- (UITextView *)suspicionTextView {
	if (!_suspicionTextView) {
	
        _suspicionTextView = [[UITextView alloc] initWithFrame:CGRectZero];
	}
	return _suspicionTextView;
}

//: 设置self.dreamMarbleImageView的圆角
+ (void)pulseThriveGracious:(UIImageView *)pulseZealCirculate whisper:(CGFloat)flexibilityNebulaGlow {
	pulseZealCirculate.layer.cornerRadius = flexibilityNebulaGlow;
	pulseZealCirculate.layer.masksToBounds = YES;
}

- (UIView *)xeroxVoyageView {
	if (!_xeroxVoyageView) {
	
        _xeroxVoyageView = [[UIView alloc] initWithFrame:CGRectZero];
	}
	return _xeroxVoyageView;
}

- (void)kingdomSetupUI {

    //: 描述_0
    UILabel *opusHummingbird = [[UILabel alloc] initWithFrame:CGRectZero];
    opusHummingbird.text = @"label_0";
    opusHummingbird.font = [UIFont systemFontOfSize:19 weight:UIFontWeightRegular];
    opusHummingbird.textColor = [UIColor colorWithRed:182/255.0 green:53/255.0 blue:120/255.0 alpha:1.0];
    opusHummingbird.textAlignment = NSTextAlignmentCenter;
    //: 不用理会的骚操作 = opusHummingbird.numberOfLines = 1;
    NSInteger magnitude = 1;
    if (magnitude>67 && magnitude < 1946) {
	    magnitude = 65;
	    NSString *kingdomGlimmerNirvana = [NSString stringWithFormat:@"%ld", (long)magnitude];
	    if (kingdomGlimmerNirvana.length>72 && [kingdomGlimmerNirvana isEqualToString:opusHummingbird.text]) {
		    magnitude = kingdomGlimmerNirvana.integerValue * 5;
	    }
    }
    opusHummingbird.numberOfLines = magnitude;
    self.elusiveQuicksilverHopeLabel = opusHummingbird;
    [self addSubview:opusHummingbird];
	[self.elusiveQuicksilverHopeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
		make.width.mas_equalTo(79);
		make.height.mas_equalTo(88);
		make.top.equalTo(@(26));
	}];

	//: 描述_1
	[self addSubview:self.suspicionTextView];
	[self.suspicionTextView mas_makeConstraints:^(MASConstraintMaker *make) {
		make.width.mas_equalTo(195);
		make.height.mas_equalTo(162);
		make.bottom.equalTo(@(13));
	}];


    //: 描述_2
    UIView *rebirth = [UIView new];
    self.kaleidoscopeView = rebirth;
    [self addSubview:rebirth];
	[self.kaleidoscopeView mas_makeConstraints:^(MASConstraintMaker *make) {
		make.width.mas_equalTo(72);
		make.height.mas_equalTo(157);
		make.top.equalTo(@(28));
		make.bottom.equalTo(@(20));
	}];


    //: 描述_3
    self.dreamMarbleImageView = [UIImageView new];
    self.dreamMarbleImageView.contentMode = UIViewContentModeScaleAspectFill;
    self.dreamMarbleImageView.clipsToBounds = YES;
    //: UIImageView的骚操作 充数
    [JoyfulKingdomView pulseThriveGracious:self.dreamMarbleImageView whisper:18];
    self.dreamMarbleImageView.frame = CGRectMake(39, 27, 145, 195);
    UIImage *quicksilver = [UIImage imageNamed:@"images/image_3.png"];
    if (quicksilver) {
	    self.dreamMarbleImageView.image = quicksilver;
    }
    [self addSubview:self.dreamMarbleImageView];

	//: 描述_4
	[self addSubview:self.xeroxVoyageView];
	[self.xeroxVoyageView mas_makeConstraints:^(MASConstraintMaker *make) {
		make.width.mas_equalTo(79);
		make.height.mas_equalTo(196);
		make.top.equalTo(@(28));
	}];
}


@end